package com.wwwarehouse.resource_center.bean.rules;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author Joseph on 2017/9/4.
 *         <p/>
 */

public class OperatorTypeBean implements Parcelable {

    /**
     * code : HUMAN
     * name : 人
     */

    private String code;
    private String name;
    private String maxTaskNum;
    private boolean isSelect  = false;

    public String getMaxTaskNum() {
        return maxTaskNum;
    }

    public void setMaxTaskNum(String maxTaskNum) {
        this.maxTaskNum = maxTaskNum;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    public OperatorTypeBean() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.code);
        dest.writeString(this.name);
        dest.writeString(this.maxTaskNum);
        dest.writeByte(this.isSelect ? (byte) 1 : (byte) 0);
    }

    protected OperatorTypeBean(Parcel in) {
        this.code = in.readString();
        this.name = in.readString();
        this.maxTaskNum = in.readString();
        this.isSelect = in.readByte() != 0;
    }

    public static final Creator<OperatorTypeBean> CREATOR = new Creator<OperatorTypeBean>() {
        @Override
        public OperatorTypeBean createFromParcel(Parcel source) {
            return new OperatorTypeBean(source);
        }

        @Override
        public OperatorTypeBean[] newArray(int size) {
            return new OperatorTypeBean[size];
        }
    };
}
